<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>文字两端对齐</title>
    <style>
        span {
            display: inline-block;
            border: 1px solid red;
            width: 4em;
            height: 40px;
            line-height: 40px;
            text-align: justify;
            /* float: left; */
        }

        span::after {
            content:'';
            display: inline-block;
            width: 100%;
            /* outline: 1px solid blue; */
        }
        .row {
            display: flex;
        }
    </style>
</head>
<body>
    <div class="layout">
        <div class="row">
            <span>姓名</span><input type="text">
        </div>
        <div class="row">
            <span>联系方式</span><input type="text">
        </div>
        <div>hello</div>


    </div>

</body>
</html>